<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title><?php echo $diy->name; ?> - Powered by DedeBIZ</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css">
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css">
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/index.css">
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script>
</head>
<body>

<div class="main mceneter">
	<?php include(DEDETEMPLATE."/plus/plus_header.htm") ;?>
	<div class="container">
		<div class="ctitle">
			<nav class="navbar navbar-expand-lg">
                <ul class="navbar-nav mr-auto mt-2">
                  <li class="nav-item">
                    <h3><?php echo $diy->name; ?>内容列表</h3>
                  </li>
                </ul>
                <span class="navbar-text">
                  <a href="diy.php?action=post&diyid=<?php echo $diy->diyid;?>" class="btn btn-success">发布信息</a>
                </span>
            </nav>
			
		</div>
		<div class="cbox mceneter">
			<div class="maplist">
			{dede:datalist}
			<table class='table' cellspacing="1">
			<?php
			if(!empty($fields))
			{
					echo '<tbody>';
					echo '<tr><td bgcolor="#eeeeee" width="20%">id</td>';
					echo '<td bgcolor="#eeeeee"><div class="left">'.$fields['id'].'</div><div class="right"><a href="diy.php?action=view&diyid='.$diy->diyid.'&id='.$fields['id'].'" target="_blank">详细...</a> &nbsp;</div></td></tr>';
					foreach($fieldlist as $field=>$fielddata)
					{
						if($fields[$field]=='') continue;
						if($fielddata[1]=='img')
						{
							$fields[$field] = "<a href='{$fields[$field]}' target='_blank'><img src='img/addon.gif' border='0' /> 图片附件</a>\r\n";
						}
						else if($fielddata[1]=='addon')
						{
							$fields[$field] = "<a href='{$fields[$field]}' target='_blank'><img src='img/addon.gif' border='0' /> 其它附件</a>";
						}
						else
						{
							if($fielddata[1]=='htmltext') $fields[$field] = html2text($fields[$field]);
							else $fields[$field] = dede_htmlspecialchars($fields[$field]);
							if( strlen($fields[$field]) > 250 )
							{
								$fields[$field] = cn_substr( $fields[$field], 250).'...';
							}
						}
						echo "<tr><td bgcolor='#ffffff'>{$fielddata[0]}</td><td bgcolor='#ffffff'>{$fields[$field]}</td></tr>\r\n";
					}
					echo '</tbody>';
			}else{
				echo "<tr><td bgcolor='#ffffff'>暂无记录</td></tr>";
			}
			?>
			</table>
			{/dede:datalist}
<table class='listtable' cellspacing="2">
<tr><td bgcolor="#ffffff">{dede:pagelist listsize=5 /}</td></tr>
</table>
			</div>
		</div>
	</div>
</div>
<?php include(DEDETEMPLATE."/plus/plus_footer.htm") ;?>
</body>
</html>